package com.bskj.common.enums;

/**
 * 
 * 停车费支付的类型
 * 
 * @author lishi
 * @date 2017-11-30 下午7:55:09
 */
public enum ParkChargeTypeEnum {
	NOT_PAY(0, "未支付"), CASH_PAY(1, "现金支付"), PLATFROM_PAY(2, "平台支付");

	private int key;
	private String value;

	private ParkChargeTypeEnum(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	public static ParkChargeTypeEnum get(int key) {
		for(ParkChargeTypeEnum typeEnum : ParkChargeTypeEnum.values()) {
			if(typeEnum.getKey() == key) {
				return typeEnum;
			}
		}
		return null;
	}
}
